<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>油站信息确认</title>
	<link rel="stylesheet" type="text/css" href="//img.ejiayou.com/activity/images/boon/company/reset.css" />
	<!-- 引入样式 -->
	<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<style type="text/css">
	[v-cloak] {
		display: none;
	}

	.header {
		width: 100%;
		display: flex;
		justify-content: center;
	}

	.el-form-item {
		margin-top: 22px;
	}

	.el-table td,
	.el-table th.is-leaf {
		text-align: center;
	}

	.el-table--enable-row-transition .el-table__body td {
		text-align: center;
	}

	.el-table-line {
		border-bottom: 1px solid #EBEEF5;
	}

	.el-table .el-table_1_column_8 .cell div:last-child div:last-child {
		border-bottom: none;
	}

	.el-table .el-table_1_column_9 .cell div:last-child div:last-child {
		border-bottom: none;
	}

	.el-table .el-table_1_column_10 .cell div:last-child div:last-child {
		border-bottom: none;
	}

	.el-table .el-table_1_column_8 .cell {
		padding-left: 0px;
		padding-right: 0px;
	}

	.el-table .el-table_1_column_9 .cell {
		padding-left: 0px;
		padding-right: 0px;
	}

	.el-table .el-table_1_column_10 .cell {
		padding-left: 0px;
		padding-right: 0px;
	}

	.el-popup-parent--hidden {
		padding-right: 0px !important;
	}

	.img_item {
		width: 400px;
		height: auto;
		margin-top: 20px;
	}

	.dialogMask .el-dialog {
		overflow: auto;
		height: 80%;
	}

	.confirmMask .el-dialog {
		top: 35%;
		left: 50%;
		transform: translate(-50%, -50%);
		position: absolute;
	}

	.confirmTitle {
		text-align: center;
		color: #333333;
		font-size: 18px;
	}

	.rejectTextarea {
		margin-top: 30px;
	}

	.download {
		width: 100%;
		display: flex;
		justify-content: flex-end;
		box-sizing: border-box;
		padding-right: 20px;
	}

	body .el-table th.gutter {
		display: table-cell !important;
	}

	.demo-form-inline {
		width: 80%;
	}

	.subscription-information-text {
		font-weight: bold;
		color: #000;
		margin-top: 10px;
	}

	/* 标题 */
	.subscription-information-text-title {
		width: 100%;
		text-align: center;
	}

	.subscription-row-icon-line {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		width: 100%;
		align-items: center;
	}

	.subscription-row-icon-line-sub-list {
		display: flex;
		width: 33%;
		flex-direction: row;
		align-items: center;
		margin: 5px 0px;
	}

	/* 一行均分 */
	.subscription-row {
		display: flex;
		flex-direction: row;
		/* justify-content: space-between; */
		width: 100%;
		align-items: center;
	}

	.subscription-row .list {
		height: 60px;
		font-size: 18px;
		width: 33%;
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.subscription-row-for {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		width: 100%;
		margin-top: 3px;
	}

	.subscription-row-for-item {

		height: 60px;
		font-size: 18px;
		width: 33%;
		display: flex;
		flex-direction: row;
		align-items: center;

		/* display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		width: 33%;
		margin-top: 3px; */
	}

	.subscription-col {
		display: flex;
		justify-content: space-between;
		width: 100%;
		flex-direction: column;
	}

	.station-detail-title {
		font-size: 20px;
		font-weight: bold;
	}

	.detail-label {
		font-size: 14px;
		margin-left: 5px;
	}

	.imgInfo_img {
		margin-top: 20px;
		width: 100px;
		height: 100px;
		object-fit: cover;
		margin-left: 10px;
		border-radius: 3px;
	}

	.imgInfo_img img {
		width: 120px;
		height: 120px;
		object-fit: cover;
	}
</style>

<body>
	<div id="app" v-cloak>
		<div class='header'>
			<el-form :inline="true" :model="formInline" class="demo-form-inline">
				<el-form-item label="油站ID">
					<el-input v-model="formInline.stationId" clearable></el-input>
				</el-form-item>
				<el-form-item label="工单ID">
					<el-input v-model="formInline.work_order" clearable></el-input>
				</el-form-item>
				<el-form-item label="油站名称">
					<el-input v-model="formInline.stationName" clearable></el-input>
				</el-form-item>
				<el-form-item label="商务经理">
					<el-select v-model="createUserId" filterable placeholder="请选择" clearable>
						<el-option v-for="item in userList2" :key="item.user_id" :label="item.user_name"
							:value="item.user_id"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="城市">
					<el-select v-model="cityId" filterable placeholder="请选择" clearable>
						<el-option v-for="item in cityList" :key="item.city_id" :label="item.city_name"
							:value="item.city_id"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="运维人员">
					<el-select v-model="userId4" filterable placeholder="请选择" clearable>
						<el-option v-for="item in userList4" :key="item.user_id" :label="item.user_name"
							:value="item.user_id"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="状态">
					<el-select v-model="orderNodeState" filterable placeholder="请选择" clearable>
						<el-option v-for="item in stateList" :key="item.stateId" :label="item.label"
							:value="item.stateId"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item>
					<el-button type="primary" @click="onSubmit">搜索</el-button>
				</el-form-item>
			</el-form>
		</div>
		<div class="download">
			<el-button type="primary" @click='downLoad'>下载表格</el-button>
		</div>
		<el-main>
			<el-table v-loading="loading" :data="tableData" border>
				<el-table-column type="index" label="序号" width="150"></el-table-column>
				<el-table-column prop="createTime" label="提交时间"></el-table-column>
				<el-table-column prop="contentObj.onLineTime" label="上线时间"></el-table-column>
				<el-table-column prop="contentObj.stationName" label="油站名称"></el-table-column>
				<el-table-column prop="contentObj.cityName" label="所属城市"></el-table-column>
				<el-table-column prop="userName" label="商务经理"></el-table-column>
				<el-table-column prop="contentObj.discountTypeName" label="优惠类型"></el-table-column>
				<el-table-column label="油品">
					<template slot-scope="scope">
						<div v-for="(item, index) in scope.row.contentObj.oilInfo" :key="index">
							<div class="el-table-line">{{item.name}}</div>
						</div>
					</template>
				</el-table-column>
				<el-table-column label="竞品结算价">
					<template slot-scope="scope">
						<!-- v-if="scope.row.contentObj.discountMeans == 1" 暂时去掉-->
						<div v-for="(item, index) in scope.row.contentObj.competitorOilPrice" :key="index">
							<div class="el-table-line">{{item}}元/升</div>
						</div>
					</template>
				</el-table-column>
				<el-table-column label="易加油结算价">
					<!-- v-if="scope.row.contentObj.discountMeans == 1" -->
					<template slot-scope="scope">
						<div v-for="(item, index) in scope.row.contentObj.oilDiscount" :key="index">
							<div class="el-table-line">{{item.settle_price}}元/升</div>
						</div>
					</template>
				</el-table-column>
				<el-table-column prop="insidePrinterStatus" label="小票机状态">
					<template slot-scope="scope">
						<div>{{scope.row.contentObj.insidePrinterStatus}}</div>
					</template>
				</el-table-column>
				<el-table-column prop="orderNodeState2" label="工单状态"></el-table-column>
				<el-table-column label="审核信息">
					<template slot-scope="scope">
						<el-button @click="handleClick(scope.row)" type="primary">查看</el-button>
					</template>
				</el-table-column>
				<el-table-column label="操作">
					<template slot-scope="scope">
						<el-button @click="openStationDetailDialog(scope.row)" type="warning">查看信息</el-button>
					</template>
				</el-table-column>

			</el-table>

			<div style="text-align: center;margin-top: 30px;">
				<el-pagination background layout="prev, pager, next" :total="total" @current-change="current_change">
				</el-pagination>
			</div>

			<el-dialog :close-on-click-modal="false" class='dialogMask' center
				:title="`${contentObj.accountName}油站合作信息审核`" :visible.sync="outerVisible" width="50%"
				:before-close="handleClose">
				<el-form ref="form" :model="formInline" label-width="100px">
					<el-form-item label="油站账户名：">
						<el-input v-model="contentObj.accountName" readonly style='width: 30%;'></el-input>
					</el-form-item>
					<el-form-item label="银行账户：">
						<el-input v-model="contentObj.bankAccount" readonly style='width: 30%;'></el-input>
					</el-form-item>
					<el-form-item label="账户支行：">
						<el-input v-model="contentObj.bankAccount" readonly style='width: 30%;'></el-input>
					</el-form-item>
					<el-form-item label="合同图片：">
						<img class="img_item" :src="contentObj.contractPic" />
					</el-form-item>
					<el-form-item label="营业执照：">
						<img class="img_item" :src="contentObj.businesslicensePic" />
					</el-form-item>
					<el-form-item label="开户许可证：">
						<img class="img_item" :src="contentObj.startbusinesslicensePic" />
					</el-form-item>
				</el-form>

				<el-dialog class='confirmMask' center width="25%" :visible.sync="innerVisible" append-to-body
					:close-on-click-modal="false" :show-close="false">
					<div class="confirmTitle">确认通过审核</div>
					<div slot="footer" class="dialog-footer">
						<el-button type="warning" @click="innerVisible = false">取消</el-button>
						<el-button type="primary" @click="getExchange(1)" v-loading.fullscreen.lock="fullscreenLoading">
							确认</el-button>
					</div>
				</el-dialog>
				<el-dialog class='confirmMask' center width="25%" :visible.sync="rejectShow" append-to-body
					:close-on-click-modal="false" :show-close="false">
					<div class="confirmTitle">确认驳回</div>
					<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" placeholder="备注："
						v-model="textarea2" resize="none" class='rejectTextarea'>
					</el-input>
					<div slot="footer" class="dialog-footer">
						<el-button type="warning" @click="rejectShowClick()">取消</el-button>
						<el-button type="primary" @click="getExchange(2)" v-loading.fullscreen.lock="fullscreenLoading">
							确认</el-button>
					</div>
				</el-dialog>

				<div slot="footer" class="dialog-footer" v-if="orderNodeState3 == 0">
					<el-button type="warning" @click="innerVisible = true">审核通过</el-button>
					<el-button @click="rejectShow = true">&nbsp;&nbsp;&nbsp; 驳回 &nbsp;&nbsp;&nbsp;</el-button>
				</div>
			</el-dialog>

			<el-dialog :close-on-click-modal="false" class='dialogMask station-detail-title' center
				:title="`${stationMessageInfo.contentObj.stationName}油站上线申请信息`" center
				:visible.sync="stationDetailVisible" width="50%" :before-close="closeStationDetailDialog">
				<div style="width: 100%;height:1px;background-color: #000;"></div>
				<div>
					<h3 class="subscription-information-text">签约信息</h3>
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">油站名称:</span>
							<span class="detail-label">{{contractPicList.station_name}}</span>
						</div>

						<div class="list">
							<span class="detail-label">签约日期:</span>
							<span class="detail-label">{{contractPicList.sign_time}}</span>
						</div>

						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">合同照片:</span>
							<el-image class="imgInfo_img" :src="contractPicList.contractPic"
								:preview-src-list="contractPicPreList" />
						</div>

					</div>
					<div style="width: 100%;height:1px;background-color: #000;"></div>
					<h3 class="subscription-information-text">油站基础信息</h3>
					<!-- 1 -->
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">油站名称:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.stationName}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站地址:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.station_area}}</span>
						</div>

						<div class="list">
							<span class="detail-label">详细地址:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.stationAddress}}</span>
						</div>

					</div>

					<!-- 2 -->
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">油站经度:</span>
							<span class="detail-label">{{longitude}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站纬度:</span>
							<span class="detail-label">{{latitude}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站规模:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.scale==1?'单站':'集团'}}</span>
						</div>

					</div>
					<!-- 3 -->
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">油站类型:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.organization_name}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站P级:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.stationLevelName}}</span>
						</div>

						<div class="list">
							<span class="detail-label">柜台电话:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.telephone}}</span>
						</div>

					</div>
					<!-- 4 -->
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">站长姓名:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.managerName}}</span>
						</div>

						<div class="list">
							<span class="detail-label">站长邮箱:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.email}}</span>
						</div>

						<div class="list">
							<span class="detail-label">站长电话:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.phone}}</span>
						</div>
					</div>

					<div style="width: 100%;height:1px;background-color: #000;"></div>

					<div v-for="(item,index) in stationMessageInfo.contentObj.competitor">
						<h3 class="subscription-information-text"
							v-if="stationMessageInfo.contentObj.station_race_infomation==1&&index==0">竞对信息</h3>

						<!-- 第一行 -->
						<div class="subscription-row" v-if="stationMessageInfo.contentObj.station_race_infomation==1">
							<div class="list">
								<span class="detail-label">竞品名称:</span>
								<span class="detail-label">{{item.competitorName}}</span>
							</div>

							<div class="list">
								<span class="detail-label">优惠类型:</span>
								<span class="detail-label">{{item.discountTypeName}}</span>
							</div>

							<div class="list">
								<span class="detail-label">优惠参照价:</span>
								<span class="detail-label">{{item.contrastType==1?'国家价':'油站价'}}</span>
							</div>
						</div>
						<!-- 2 -->
						<div class="subscription-row-for"
							v-if="stationMessageInfo.contentObj.station_race_infomation==1">
							<div class="subscription-row-for-item" v-for="(pItem,index) in item.price">
								<span class="detail-label">{{pItem.name}}结算单价:</span>
								<span class="detail-label">{{pItem.settlePrice}}元/升</span>
							</div>
						</div>
					</div>

					<div v-if="stationMessageInfo.contentObj.competitor&&stationMessageInfo.contentObj.competitor.length>0"
						style="width: 100%;height:1px;background-color: #000;margin-top: 5px;"></div>
					<h3 class="subscription-information-text">油品信息</h3>
					<!-- 1 -->
					<div class="subscription-row" v-for="(vItem,index) in stationMessageInfo.contentObj.oilInfo">
						<div class="list">
							<span class="detail-label">{{vItem.name}}油站价:</span>
							<span class="detail-label">{{vItem.stationPrice}}元/升</span>
						</div>

						<div class="list">
							<span class="detail-label">{{vItem.name}}油枪:</span>
							<span class="detail-label">{{vItem.oilgunCode}}</span>
						</div>

						<div class="list">

						</div>
					</div>

					<div v-if="stationMessageInfo.contentObj.oilInfo&&stationMessageInfo.contentObj.oilInfo.length>0"
						style="width: 100%;height:1px;background-color: #000;margin-top: 5px;"></div>

					<h3 class="subscription-information-text">长期结算优惠信息</h3>
					<!-- 1 -->
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">优惠类型:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.discountTypeName}}</span>
						</div>

						<div class="list">
							<span class="detail-label">优惠参考价:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.contrastType==1?'油站价':'国家价'}}</span>
						</div>

						<div class="list">
							<span class="detail-label">优惠方式:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.discountMeans==1?'统一优惠':'区分用户'}}</span>
						</div>
					</div>
					<!-- 2 -->
					<div class="subscription-row"
						v-if="stationMessageInfo.contentObj.oilDiscount&&stationMessageInfo.contentObj.oilDiscount.length>0">
						<div class="list">
							<span class="detail-label">92#结算单价:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.oilDiscount[0].discount}}元/升</span>
						</div>

						<div class="list">
							<span class="detail-label">95#结算单价:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.oilDiscount[1].discount}}元/升</span>
						</div>

						<div class="list">

						</div>
					</div>
					<!-- 3 -->
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">可动态定价:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.dynamicPrice==1?'是':'否'}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站上线合作平台:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.isPlatform==1?'是':'否'}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站手续费:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.stationFee}}%</span>
						</div>
					</div>
					<!-- 4 -->
					<div class="subscription-row">
						<!-- 银行服务费 之前四步写死的  -->
						<div class="list">
							<span class="detail-label">银行服务费:</span>
							<span class="detail-label">1元/笔</span>
						</div>

						<div class="list">

						</div>

						<div class="list">

						</div>
					</div>
					<div style="width: 100%;height:1px;background-color: #000;margin-top: 5px;"></div>

					<h3 class="subscription-information-text">油站环境照片</h3>
					<div class="subscription-row-icon-line">
						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">环境照片</span>
							<el-image class="imgInfo_img" :src="stationMessageInfo.contentObj.stationFilePic"
								:preview-src-list="stationFilePicPreList" />
						</div>

						<div class="subscription-row-icon-line-sub-list">

						</div>

						<div class="subscription-row-icon-line-sub-list">

						</div>
					</div>
					<div style="width: 100%;height:1px;background-color: #000;margin-top: 5px;"></div>
					<h3 class="subscription-information-text">合作信息</h3>
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">上线时间:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.onLineTime}}</span>
						</div>

						<div class="list">
							<span class="detail-label">合作时间:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.cooperationTime}}</span>
						</div>

						<div class="list">
							<span class="detail-label">押金:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.cashPledge==1?stationMessageInfo.contentObj.cashPledgePrice+'元':'无'}}</span>
						</div>
					</div>

					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">区域保护:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.areaProtection==0?'无':'有'}}</span>
						</div>

						<div class="list">
							<span class="detail-label">渠道费减免:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.channelFeeReduce&&stationMessageInfo.contentObj.channelFeeReduce==1?'有':'无'}}</span>
						</div>

						<div class="list">
							<span class="detail-label">特殊附加条件:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.addConditions?stationMessageInfo.contentObj.addConditions:'无'}}</span>
						</div>
					</div>
					<div style="width: 100%;height:1px;background-color: #000;margin-top: 5px;"></div>
					<h3 class="subscription-information-text">结算基本信息</h3>
					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">油站对公账户名:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.accountName}}</span>
						</div>

						<div class="list">
							<span class="detail-label">油站账户支行:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.bankBranch}}</span>
						</div>

						<div class="list">
							<span class="detail-label">银行账户:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.bankAccount}}</span>
						</div>
					</div>

					<div class="subscription-row">
						<div class="list">
							<span class="detail-label">账户类型:</span>
							<span
								class="detail-label">{{stationMessageInfo.contentObj.accountType==1?'企业户':'个人户'}}</span>
						</div>

						<div class="list">
							<span class="detail-label">银行名称:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.bankName}}</span>
						</div>

						<div class="list">
							<span class="detail-label">开户省份:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.provinceName}}</span>
						</div>
					</div>

					<div class="subscription-row-icon-line">
						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">开户城市:</span>
							<span class="detail-label">{{stationMessageInfo.contentObj.accountCityName}}</span>
						</div>

						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">营业执照:</span>

							<el-image class="imgInfo_img" :src="stationMessageInfo.contentObj.businesslicensePic"
								:preview-src-list="businesslicensePicPreList" />
						</div>

						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">开户许可证:</span>
							<el-image class="imgInfo_img" :src="stationMessageInfo.contentObj.startbusinesslicensePic"
								:preview-src-list="startbusinesslicensePicPreList" />
						</div>
					</div>

					<div class="subscription-row-icon-line">
						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">法人身份证正面:</span>
							<el-image class="imgInfo_img" :src="stationMessageInfo.contentObj.legalFrontPic"
								:preview-src-list="legalFrontPicPreList" />
						</div>

						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">法人身份证反面:</span>
							<el-image class="imgInfo_img" :src="stationMessageInfo.contentObj.legalReversePic"
								:preview-src-list="legalReversePicPreList" />
						</div>

						<div class="subscription-row-icon-line-sub-list">
							<span class="detail-label">油品经营危化证:</span>
							<el-image class="imgInfo_img" :src="stationMessageInfo.contentObj.DangerousPic"
								:preview-src-list="dangerousPicPreList" />
						</div>
					</div>

					<div slot="footer" class="dialog-footer" style="text-align: center;margin-top: 10px;">
						<el-button type="primary" @click="closeStationDetailDialog">关闭</el-button>
					</div>
				</div>
			</el-dialog>
	</div>
	</el-main>
	</div>
</body>

<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
<script src="//unpkg.com/element-ui@2.15.3/lib/index.js"></script>
<script src="//img.ejiayou.com/activity/pages/freeOrders/js/jquery-1.9.1.min.js"></script>
<script src="//cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>
<script src="//img.ejiayou.com/activity/images/groupon/common.js"></script>
<script>

	var origin = ''
	// if (window.location.origin.indexOf("localhost:8080") != -1) {
	// 	origin = "//localhost:8080"
	// }
	if (window.location.origin.indexOf("dev.ejiayou.com") != -1) {
		origin = "//dev.ejiayou.com"
	} else if (window.location.origin.indexOf("grey.ejiayou.com") != -1) {
		origin = "//grey.ejiayou.com"
	} else if (window.location.origin.indexOf("api.ejiayou.com") != -1) {
		origin = "//finance.ejiayou.com"
	} else {
		origin = "//finance.ejiayou.com"
	}
	var json_list = ''

	var vm = new Vue({
		el: '#app',
		data: function () {
			return {
				subscriptionForm: {},
				// activityHost: (window.location.origin.indexOf("dev.ejiayou.com") != -1 ? window.location.origin : "//finance.ejiayou.com"),
				//activityHost: '//localhost:8080',
				activityHost: origin,
				userId: '',
				total: 12,
				pagesize: 10,
				pageNum: 1,
				currentPage: 1,
				outerVisible: false,
				innerVisible: false,
				stationDetailVisible: false,  //油站详情visible
				rejectShow: false,
				textarea2: '',//驳回内容
				cityId: '',//城市
				createUserId: '',//商务经理
				userId4: '',//运维人员
				orderNodeState: '',
				formInline: {
					stationName: '',
					work_order: '',
					stationId: ''
				},
				stateList: [{
					stateId: 0,
					label: '未审核'
				}, {
					stateId: 1,
					label: '已通过'
				}, {
					stateId: 2,
					label: '已驳回'
				}],
				tableData: [],
				loading: true,
				cityList: [],
				userList2: [],
				userList4: [],
				urls: '',
				contentObj: {},
				work_order_id: '',
				orderNodeState3: '',
				fullscreenLoading: false,
				fileList3: [],

				contractPicPreList: [], //合同照片 预览图片
				stationFilePicPreList: [], // 环境照片预览图片
				businesslicensePicPreList: [], //营业执照预览图片
				startbusinesslicensePicPreList: [], //开户许可证预览图片
				legalFrontPicPreList: [], //法人身份证正面预览图片
				legalReversePicPreList: [], //法人身份证反面预览图片
				dangerousPicPreList: [],


				longitude: '', //切割出经度
				latitude: '', //切割出纬度
				//油站信息
				stationMessageInfo: {
					"orderNodeState": 1,
					"createTime": "",
					"fillingStationId": 22223819,
					"contentObj": {
						"cooperate_oil": [
							"92#",
							"95#"
						],
						"insidePrinter": "",
						"businesslicensePics": [

						],
						"cityId": "",
						"managerName": "",
						"addConditions": "",
						"needPrinter": "",
						"sales": "",
						"station_race_infomation": "",
						"contractFilePics": [

						],
						"stationFee": "",
						"onLineTime": "",
						"area_value": "",
						"discountMeans": "",
						"dynamicPrice": "",
						"longitude": "",
						"stationId": "",
						"bankAccount": "",
						"legalFrontPic": "",
						"organizationName": "",
						"startbusinesslicensePics": [

						],
						"accountType": "",
						"legalReversePic": "",
						"station_area": "",
						"telephone": "",
						"organization_name": "",
						"provinceId": "",
						"discountTypeName": "",
						"accountCityName": "",
						"competitorOilPrice": [
							"",
							""
						],
						"commissionName": "",
						"legalReversePics": [

						],
						"channelFeeReduce": "",
						"contractPics": [
							{
								"isImage": true,
								"file": "",
								"message": "",
								"content": "",
								"status": ""
							}
						],
						"phone": "",
						"oilInfo": [
							{
								"oilId": '',
								"stationPrice": '',
								"oilgunCode": "",
								"name": "",
								"countryPrice": "",
								"oilDiscount": "",
								"settlePrice": "",
								"stationprice": "",
								"oilPrice": ''
							},
							{
								"oilId": '',
								"stationPrice": '',
								"oilgunCode": "",
								"name": "",
								"countryPrice": "",
								"settlePrice": "",
								"oilDiscount": "",
								"stationprice": "",
								"oilPrice": ''
							}
						],
						"cashPledgePrice": "",
						"stationLevel": '',
						"publicAccount": "",
						"provinceName": "",
						"contractFilePic": "",
						"areaProtection": "",
						"wordOrderId": '',
						"accountName": "",
						"latitude": "",
						"isPlatform": "",
						"scale": "",
						"bankName": "",
						"positionName": "",
						"cityName": "",
						"legalFrontPics": [

						],
						"stationName": "",
						"discountType": "",
						"commission": '',
						"stationFilePic": "",
						"isActivity": "",
						"DangerousPics": [

						],
						"stationFilePics": [

						],
						"DangerousPic": "",
						"email": "",
						"townsId": "",
						"cashPledge": "",
						"bankBranch": "",
						"cooperationTime": "",
						"contrastType": "",
						"userId": "",
						"stationAddress": "",
						"longitude_latitude": "",
						"positionId": 1,
						"insidePrinterStatus": "",
						"contractPic": "",
						"organization": 1,
						"startbusinesslicensePic": "",
						"oilDiscount": [
							{
								"oilId": '',
								"stationPrice": '',
								"settle_price": "",
								"discountPrice": "",
								"discount": '',
								"oilName": ""
							},
							{
								"oilId": '',
								"stationPrice": '',
								"settle_price": "",
								"discountPrice": "",
								"discount": '',
								"oilName": ""
							}
						],
						"businesslicensePic": ""
					},
					"id": 14641,
					"userName": "",
					"orderNodeState2": ""
				},
				contractPic: [],
				contractPicList: {},
			}
		},
		created: function () {
			this.urls = this.activityHost + '/cwxt/work/station/export_all_station_list?userId=' + getQueryVariable('user_id')
				+ '&stationName=' + this.formInline.stationName
				+ '&createUserId=' + this.createUserId
				+ '&cityId=' + this.cityId
				+ '&orderNodeState=' + this.orderNodeState
			console.log(this.urls)
			this.getAllCity()
			this.getUserList2()
			this.getUserList4()
			this.getList()

		},
		mounted: function () {
		},
		methods: {


			getFormData: function (rowWorkOrderId, fn) {
				var self = this
				var adminId = getQueryVariable('user_id')
				var data = {
					admin_id: adminId,
					work_order_id: rowWorkOrderId
				}
				$.ajax({
					url: '/eapi/v1/activity/work/info?t=' + new Date().getTime(),
					data: data,
					type: 'get',
					dataType: 'json',
					success: function (res) {
						console.log(res)
						if (res.status == 200) {
							var resData = res.data
							self.title = resData.title
							json_list = JSON.parse(resData.content)
							if (fn) {
								fn()
							}
						}
					}
				})

			},
			getSignInfo: function (rowWorkOrderId) {
				var self = this
				var adminId = getQueryVariable('user_id')

				$.ajax({
					url: '/eapi/v1/activity/work/get_sign_station_info_by_id',
					data: {
						admin_id: adminId,
						work_order_id: rowWorkOrderId

					},
					type: 'POST',
					success: function (res) {
						console.log('签名信息', res)
						if (res.status == 200) {
							var resData = res.data
							self.contractPicList = JSON.parse(resData.content)
							self.contractPicPreList = []
							self.contractPicPreList.push(self.contractPicList.contractPic)
						}
					}
				})
			},
			getAllCity: function () { //方案列表
				var that = this
				$.ajax({
					type: 'GET',
					url: this.activityHost + '/cwxt/common/city/get_all_city',
					data: {},
					success: function (res) {
						if (res.code == 0) {
							that.cityList = res.data.list
						}
					},
					error: function (res) {

					}
				})
			},
			getUserList2: function () { //商务经理
				var that = this
				$.ajax({
					type: 'GET',
					url: this.activityHost + '/cwxt/common/work_user/user_list',
					data: {
						role_type: 2
					},
					success: function (res) {
						if (res.code == 0) {
							that.userList2 = res.data.list
						}
					},
					error: function (res) {

					}
				})
			},
			getUserList4: function () { //运维人员
				var that = this
				$.ajax({
					type: 'GET',
					url: this.activityHost + '/cwxt/common/work_user/user_list',
					data: {
						role_type: 4
					},
					success: function (res) {
						if (res.code == 0) {
							that.userList4 = res.data.list
						}
					},
					error: function (res) {

					}
				})
			},
			getList: function () { //列表
				var that = this
				$.ajax({
					type: 'POST',
					url: this.activityHost + '/cwxt/work/station/list?pageNum=' + that.pageNum + '&pageSize=10',
					contentType: 'application/json',
					data: JSON.stringify({
						userId: getQueryVariable('user_id') || '1098',
						stationName: that.formInline.stationName,
						createUserId: that.createUserId,
						cityId: that.cityId,
						orderNodeState: that.orderNodeState,
						workOrderId: that.formInline.work_order,
						stationId: that.formInline.stationId
					}),
					success: function (res) {
						that.loading = false
						if (res.code == 0) {
							that.tableData = res.data.list
							that.total = res.data.total
							for (var i = 0; i < that.tableData.length; i++) {
								var orderNodeState2 = that.tableData[i].orderNodeState
								if (orderNodeState2 == 0) {
									orderNodeState2 = '未审核'
								} else if (orderNodeState2 == 1) {
									orderNodeState2 = '已通过'
								} else {
									orderNodeState2 = '已驳回'
								}
								that.$set(that.tableData[i], 'orderNodeState2', orderNodeState2)

							}
						}
					},
					error: function (res) {

					}
				})
			},
			downLoad: function () {//下载表格
				this.urls = this.activityHost + '/cwxt/work/station/export_all_station_list?userId=' + getQueryVariable('user_id')
					+ '&stationName=' + this.formInline.stationName
					+ '&createUserId=' + this.createUserId
					+ '&cityId=' + this.cityId
					+ '&orderNodeState=' + this.orderNodeState
				window.open(this.urls)
			},
			onSubmit: function () {
				var that = this
				that.pageNum = 1
				that.getList()
			},
			handleClick: function (row) {
				this.outerVisible = true
				this.textarea2 = ''
				this.contentObj = row.contentObj
				this.work_order_id = row.id
				this.orderNodeState3 = row.orderNodeState
			},
			current_change: function (currentPage) {
				this.loading = true
				this.currentPage = currentPage;
				this.pageNum = currentPage
				this.getList()
			},
			handleClose(done) {
				this.outerVisible = false
			},
			getExchange: function (audit) { //流转工单
				var that = this
				that.fullscreenLoading = true
				$.ajax({
					type: 'POST',
					url: '/eapi/v1/activity/work/exchange_node',
					data: {
						admin_id: getQueryVariable('user_id'),
						work_order_id: that.work_order_id,
						audit: audit,
						remark: that.textarea2
					},
					success: function (res) {
						that.fullscreenLoading = false
						that.textarea2 = ''
						if (res.status == 200) {
							that.getList()
							that.outerVisible = false
							that.innerVisible = false
							that.rejectShow = false
						}
					},
					error: function (res) {
						that.fullscreenLoading = false
						var resData = JSON.parse(res.responseText)
						that.$message.error(resData.error.message);
					}
				})
			},
			rejectShowClick: function () {
				this.rejectShow = false
				this.textarea2 = ''
			},
			goToPage: function (row) {
				//查看图片 isReader = true
				//window.localStorage.setItem('isReader', 'true');
				window.open("oil_sign.html?user_id=" + getQueryVariable('user_id') + '&work_order_id=' + row.id);
			},
			//打开油站详情弹窗
			openStationDetailDialog(row) {
				var self = this
				this.getSignInfo(row.id)
				const contentObj = row['contentObj']
				contentObj['stationLevelName'] = 'p' + contentObj['stationLevel'] + '级'
				this.stationMessageInfo = row
				//放置环境预览图片
				this.stationFilePicPreList = []
				this.stationFilePicPreList.push(this.stationMessageInfo.contentObj.stationFilePic)

				this.businesslicensePicPreList = []
				this.businesslicensePicPreList.push(this.stationMessageInfo.contentObj.businesslicensePic)

				//添加许可证预览图片
				this.startbusinesslicensePicPreList = []
				this.startbusinesslicensePicPreList.push(this.stationMessageInfo.contentObj.startbusinesslicensePic)

				//身份证正面照片预览图片
				this.legalFrontPicPreList = []
				this.legalFrontPicPreList.push(this.stationMessageInfo.contentObj.legalFrontPic)

				//身份证反面预览图片
				this.legalReversePicPreList = []
				this.legalReversePicPreList.push(this.stationMessageInfo.contentObj.legalReversePic)


				this.dangerousPicPreList = []
				this.dangerousPicPreList.push(this.stationMessageInfo.contentObj.DangerousPic)

				if (this.stationMessageInfo.contentObj.longitude_latitude) {
					var arr = this.stationMessageInfo.contentObj.longitude_latitude.split(',') //逗号切割
					if (arr && Array.isArray(arr)) {
						this.longitude = arr[0]
						this.latitude = arr[1]
					}
				}
				this.stationDetailVisible = true


			},
			//关闭油站详情弹窗
			closeStationDetailDialog() {
				this.stationDetailVisible = false
			}
		}
	})
</script>

</html>